﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
using System.Reflection;
using System.IO;

namespace ProjectTest
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            //MessageBox.Show("IP地址:"+ipControl1.IpAddr.ToString()+",端口:" + ipControl1.Port.ToString());
            string url = @"http://192.168.0.17:8089/save/合箱.zip";
            string args =  url + " " + "这是一个测试";
            string currentDir = Assembly.GetExecutingAssembly().ManifestModule.FullyQualifiedName;
            currentDir = Path.GetDirectoryName(currentDir);
            string path = Path.Combine(currentDir, "AutoUpdate.exe");
            Process pross = System.Diagnostics.Process.Start(path, args); //启动更新程序
            System.Diagnostics.Process.GetCurrentProcess().Kill();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            MessageBox.Show(ipControl1.Text);   
        }
    }
}